﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace NextGenSystems.WHMCS
{
    [DataContract()] 
    public class WHMCSBASE : INotifyPropertyChanged 
    {
        private string _Action;
        private string _Result;
        private string _ErrorMessage;

        [DataMember()]
        public virtual string Action
        {
            get { return _Action; }
            set
            {
                if (_Action != value)
                {
                    _Action = value;
                    NotifyPropertyChanged("Action");
                }
            }
        }

        [DataMember()]
        public virtual string Result
        {
            get { return _Result; }
            set
            {
                if (_Result != value)
                {
                    _Result = value;
                    NotifyPropertyChanged("Result");
                }
            }
        }



        [DataMember()]
        public virtual string ErrorMessage
        {
            get { return _ErrorMessage; }
            set
            {
                if (_ErrorMessage != value)
                {
                    _ErrorMessage = value;
                    NotifyPropertyChanged("ErrorMessage");
                }
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
        public void NotifyPropertyChanged(String propertyName)
        {
            if (null != PropertyChanged)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
